@charset 'utf-8';
@import  'sandal/core';
@import  'core/mixins', 'core/functions', 'core/vars';

// 首页鼠标移入效果

// // 鼠标移入效果1
.ht-block-ani {
    @extend %clearfix;
    text-align: justify;

    li {
        position: relative;
        float: left;
        width: 300px;
        height: 300px;
        margin-right: 30px;
        padding: 40px 20px 0;
        color: #fff;
        line-height: 2;
        overflow: hidden;
        transform: translateY(0);
        -ms-transform: translateY(0);
        transition: 0.3s;

        &:hover {
            transform: translateY(-20px);
            -ms-transform: translateY(-20px);
            box-shadow: 0 15px 30px rgba(0,0,0,.3);

            p {
                height: 100px;
            } 
        }
    }

    .ht-block-ani-title {
        position: absolute;
        top: 24px;
        right: 20px;
        z-index: 2;
        font-size: $font26;
        text-align: right;
        line-height: 1;

        span {
            margin-top: 10px;
            font-size: $font16;
            display: block;
        }
    }

    img {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        display: block;
    }

    p {
        position: absolute;
        bottom: -10px;
        left: 0;
        right: 0;
        height: 0;
        display: block;
        font-size: 12px;
        padding: 10px 20px 0;
        background: rgba(0, 0, 0, .8);
        transition: .3s;
    }
}

// 鼠标移入效果2
.ht-block-ani2 {
    margin-top: 80px;
    margin-left: 30px;
    @extend %clearfix;

    li {
        position: relative;
        float: left;
        width: 120px;
        height: 120px;
        margin-right: 70px;
        color: #fff;
        background-color: #48528b;
        transform: rotate(45deg);
        -ms-transform: rotate(45deg);
        transition: .5s;
        z-index: 2;

        &:nth-child(even) {
            background-color: #3870c2;
        }

        &:before, &:after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: 1px solid $colorBrown;
            transform: translate(0, 0) scale(1);
            -ms-transform: translate(0, 0) scale(1);
            transition: .5s;
            z-index: -1;
        }

        &:hover {
            transform: scale(.9) rotate(45deg);
            -ms-transform: scale(.9) rotate(45deg);

            &:before {
                transform: translate(-6px, -6px) scale(1.1) ;
                -ms-transform: translate(-6px, -6px) scale(1.1) ;
            }
            &:after {
                transform: translate(6px, 6px) scale(1.1);
                -ms-transform: translate(6px, 6px) scale(1.1);
            }

            p {
                transform: rotate(-45deg) translateY(-70px);
                -ms-transform: rotate(-45deg) translateY(-70px);

                span {
                    opacity: 0;
                }
                a {
                    opacity: 1;
                    transform: scale(1.1);
                    -ms-transform: scale(1.1);
                }
            }
        }
    }

    p {
        position: relative;
        width: 100%;
        margin: 0 auto;
        line-height: 120px;
        font-size: $font20;
        transform: rotate(-45deg) translateY(0);
        -ms-transform: rotate(-45deg) translateY(0);
        z-index: 2;
        transition: .5s;
        text-align: center;
        
        span {
            opacity: 1;
            transition: .5s;
        }

        a {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            width: 100px;
            margin: 0 auto;
            color: $colorYellow;
            line-height: 1;
            opacity: 0;
            transition: .5s;

            &:before, &:after {
                content: "";
                position: absolute;
                left: 0;
                width: 2px;
                height: 18px;
                background-color: $colorYellow;
            }
            &:after {
                left: auto;
                right: 0;
            }
        }
    }
}